#ifndef __EDO_MODULATOR_H__
#define __EDO_MODULATOR_H__

#include "Includes.h"

class EdoModulator
{
	public:
		EdoModulator(const uint8 _controllerMidiType);
		~EdoModulator();
		void fromString (const String &stringVersion);
		void setValue (const int64 &newValue);
		const int64 getValue () { return (currentValue); }
		void *getData ();
		const int getDataSize();
		void setAssosiatedComponent (Component *componentToAssosiate);
		Component *getAssosiatedComponent() { return (assosiatedComponent); }
		void valueChanged();
		void setName (const String &newName) { controllerName = newName; }
		const String &getName();
		void sysEx();

	private:
		const uint8 getMidiChannel();
		int64 currentValue;
		int64 expectedNewValue;
		uint32 modulatorBytePosition;
		uint32 channelBytePosition;
		Component *assosiatedComponent;
		void *rawData;
		uint32 rawDataSize;
		MemoryBlock dataStorage;
		String formulaString;
		uint8 controllerMidiType;
		String controllerName;
		bool usesExternalData;
		bool transmitOnValueChange;
};

#endif